<template>
  <div>
     <div>{{str}}</div>
     <button @click="fn">按钮</button>
   </div>
</template>
 
<script>
export default {

  data() {
    return {
      str:'hello,wolrd'
    };
  },

  methods: {
    fn(){
      this.str=this.str.split('').reverse().join('')
    }
  }
};
</script>

<style scoped>
     
</style>